function output = SGLD(image,d,sita)
%get the spatial grey level dependence matrices of single d and single sita
%param d: the ditance value of SGLD
%param sita: the angle value of SGLD
dx = round(d*cos(sita));
dy = round(d*sin(sita));
image = double(image);
%image = image -1500;
image = image - 1000;
image = floor(image/6);
image(image<0) = 0;
%image(image>299) = 0;
image(image>399) = 0;
%output = zeros(300,300);
output = zeros(400,400);
[m,n] = size(image);
ddx = abs(dx);
ddy = abs(dy);
for i =ddx+1:m-ddx
    for j =ddy+1:n-ddy
        output(image(i,j)+1,image(i-dx,j+dy)+1) = output(image(i,j)+1,image(i-dx,j+dy)+1) + 1;
        output(image(i,j)+1,image(i+dx,j-dy)+1) = output(image(i,j)+1,image(i+dx,j-dy)+1) + 1;
    end
end
output(1,:) = 0;
output(:,1) = 0;

